package com.supplychainapi.service;

import com.github.pagehelper.PageInfo;
import com.joindata.inf.common.basic.exceptions.ServiceException;
import com.supplychainapi.domain.IncrementRate;
import com.supplychainapi.domain.PriceLvl;
import com.supplychainapi.domain.SaleMode;
import com.supplychainapi.model.ScmTbcust;
import com.supplychainapi.param.ColTitle;

import java.util.List;
import java.util.Map;

/**
 * Created by shenhong on 2017/10/14.
 */
public interface IScmTbcustService {
    /**
     * 新增客户信息
     * @param cust
     * @throws ServiceException
     */
    void addScmTbcustInfo(ScmTbcust cust) throws ServiceException;

    /**
     * 更新客户信息
     * @param cust
     * @throws ServiceException
     */
    void updateScmTbcustInfo(ScmTbcust cust) throws ServiceException;
    /**
     * 根据供应商供应商代码获取供应商信息
     * @param fsCustId
     * @return
     */
    ScmTbcust getCustInfo(String fsCustId) throws ServiceException;

    ScmTbcust getCustByFsShopGUIDList(String fsShopGUID, String fsCustId) throws ServiceException;

    void deleteCustInfo(List<String> fsCustIdList, List<String> fsShopGUIDList) throws ServiceException;
    /**
     * 根据 供应商代码 供应商名称 助记码 进行查询
     * @param keyWord
     * @param page 分页码
     * @param pageSize 条数
     * @return
     * @throws ServiceException
     */
    List<ScmTbcust> getByKeyWordCustInfoList(String keyWord, Integer page, Integer pageSize) throws ServiceException;

    List<ScmTbcust> getCustListInfo(String fsShopGUID, String fsNodeCode, Integer page, Integer pageSize) throws ServiceException;

    /**
     * 根据供应商名称模糊查询供应商信息
     * @param fsShopGUID
     * @param fsCustName
     * @param page
     * @param pageSize
     * @return
     * @throws ServiceException
     */
    List<ScmTbcust> getCustByFsCustNameListInfo(String fsShopGUID, String fsCustName, Integer page, Integer pageSize) throws ServiceException;

    Boolean getCustNameIsExit(String fsShopGUID, String fsCustName, String fsCustId, String type) throws ServiceException;

    int count(ScmTbcust param);

    List<ColTitle> getSchema();

    PageInfo getCustListInfoPC(String fsShopGUID, String keyWord, String fsNodeCode, Integer pageNum,
                               Integer pageSize) throws ServiceException;

    PageInfo getChoiceCustListInfo(String fsShopGUID, String keyWord,
                                   String fsNodeCode, Integer pageNum, Integer pageSize) throws ServiceException;

    Map<String, List<IncrementRate>> getIncrementRate();

    Map<String, List<SaleMode>> getSaleMode();

    Map<String, List<PriceLvl>> getPriceLvl();

    int updateFullText(ScmTbcust tbcust);


    List<ScmTbcust> findFullCode(String fsShopGuid, String fullCode) throws ServiceException;

}
